package concurrency.chapter1;

import java.util.concurrent.TimeUnit;

/**
 * @author honway.liu
 * @date 2019-06-03 22:26
 * @email gm100861@gmail.com
 * @blog http://linuxsogood.org
 */
public class Bank {

    public static void main(String[] args) {/*
        ServiceWindow serviceWindow1 = new ServiceWindow("一号柜台");
        serviceWindow1.start();
        ServiceWindow serviceWindow2 = new ServiceWindow("二号柜台");
        serviceWindow2.start();
        ServiceWindow serviceWindow3 = new ServiceWindow("三号柜台");
        serviceWindow3.start();*/

        Thread thread = new Thread(() -> {
            System.out.println("ok?");
            try {
                TimeUnit.SECONDS.sleep(1);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }, "Test");
        thread.start();
        while (thread.isAlive()) {

        }
        System.out.println("ending.");
    }
}
